<!DOCTYPE html>
<html>
<head>
    <title>网银支付 安全快速</title>
    <link href="/tcpay/css/theme.css" rel="stylesheet">
    <link rel="stylesheet" href="/alipay_tf/layer(1).css" id="layuicss-layer">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        body {
            background: white;
        }

        .display {
            display: flex;
            flex-flow: row wrap;
            align-items: center;
        }

        .content {
            width: 100%;
            display: flex;
            flex-flow: row wrap;
            justify-content: center;
            align-items: center;
            padding-bottom: 25px;
        }

        .content-header {
            width: 345px;

        }

        .content-header p:nth-child(1) {
            font-size: 25px;
            font-family: PingFang SC, PingFang SC-Heavy;
            font-weight: 800;
            text-align: center;
            color: #000000;
            margin-top: 30px;
        }

        .content-header p:nth-child(2) {
            font-size: 17px;
            font-family: PingFang SC, PingFang SC-Medium;
            font-weight: 500;
            text-align: center;
            color: #ff2d2e;
            margin-top: 10px;

        }

        .content-content {
            width: 345px;

            background: #d9edf6;
            border: 1px solid #cbdde9;
            border-radius: 5px;
            padding-bottom: 20px;
            margin: 15px 0;
            margin-bottom: 0;
        }

        .content-content-div {
            font-size: 12px;
            font-family: PingFang SC, PingFang SC-Medium;
            font-weight: 500;
            text-align: center;
            color: #3a6979;
            margin-top: 15px;
        }

        .content-content-dvc {

            margin-top: 25px;
        }

        .content-content-mess {
            width: 345px;
            height: 50px;
            flex-flow: row nowrap !important;
            justify-content: center;
            margin-top: 15px;
            /* border: 1px solid red; */
        }

        .content-content-mess p {
            width: 100%;
            font-size: 16px;
            font-family: PingFang SC, PingFang SC-Bold;
            font-weight: 700;
            text-align: center;
            color: #000000;
            /* border: 1px solid red; */

        }

        .content-content-mess div {
            width: 102px;
            height: 40px;
            background: #ff2d2e;
            border-radius: 5px;
            font-size: 14px;
            font-family: PingFang SC, PingFang SC-Medium;
            font-weight: 500;
            text-align: center;
            color: #ffffff;
            line-height: 30px;
            flex-shrink: 0;
            margin: 25px
        }

        .warn {
            width: 345px;
            background: #f5f5f5;
            border-radius: 5px;
            margin: 15px 0;
            margin-bottom: 0;
            justify-content: flex-start;
            padding: 9px 0;
            margin-bottom: 0;
        }

        .warn-img {
            width: 31px;
            height: 28px;
            margin-left: 15px;
        }

        .warn-img img {
            width: 100%;
            height: 100%;
        }

        .warn-content {
            justify-content: flex-start;
            margin-left: 15px;
        }

        .warn-content p {
            width: 261px;
            font-size: 12px;
            font-family: PingFang SC, PingFang SC-Medium;
            font-weight: 500;
            text-align: left;
            color: #ca3539;

        }

        .warn-content p:nth-child(2) {
            margin-top: 10px;
        }

        .content-bottom {
            width: 345px;
            /* margin:0 auto; */

        }

        .unpay {
            width: 345px;
            /* margin: 0 auto; */
            justify-content: flex-start;
            background: #f5f5f5;
            border-radius: 5px;
            margin-top: 10px;
            padding: 10px 0 12px 0;
            overflow: hidden;
        }

        .unpay-img {
            width: 26px;
            height: 26px;
            margin-left: 17px;
        }

        .unpay-img img {
            width: 100%;
            height: 100%;
        }

        .unpey-text {
            margin-left: 17px;

        }

        .unpey-text p:nth-child(1) {
            font-size: 14px;
            font-family: PingFang SC, PingFang SC-Bold;
            font-weight: 700;
            text-align: left;
            color: #000000;

        }

        .unpey-text p:nth-child(2) {
            width: 250px;
            font-size: 12px;
            font-family: PingFang SC, PingFang SC-Medium;
            font-weight: 500;
            text-align: left;
            color: #808080;
        }

        .countDown {
            width: 345px;
            padding: 10px 0;
            background: #f5f5f5;
            border-radius: 5px;
            margin: 15px 0;
            margin-bottom: 0;
        }

        .countDown p {
            font-size: 12px;
            font-family: PingFang SC, PingFang SC-Medium;
            font-weight: 500;
            text-align: center;
            color: #3a6979;
            letter-spacing: 2px;
        }

        .countDown span {
            font-size: 15px;
            font-family: PingFang SC, PingFang SC-Medium;
            font-weight: 500;
            text-align: center;
            color: #ca3539;

        }

        .valueInp {
            opacity: 0;
            position: absolute;
            top: 0;
            left: 0;
        }

        .box {
            max-width: 375px;
            height: 100%;
            display: flex;
            flex-flow: row nowrap;
            justify-content: center;
            align-items: center;
            margin: 0 auto;
        }
    </style>
</head>
<link href="/tcpay/vendor/bootstrap-4.4.1-dist/css/bootstrap.min.css" rel="stylesheet">
<link href="/tcpay/vendor/fontawesome-free/css/all.min.css" rel="stylesheet">
<body>
<div class="box" id="main_cc">
    <div class="content" id="main_cc">
        <div class="content-content">
            <div class="content-content-div">
                请复制相关信息转账即可自动到账
                <div style="color: red; text-decoration: underline">超时请重新下订单，否则不到账后果自负</div>
            </div>
            <div class="content-content-dvc">
                <div class="content-content-mess display">
                    <p id="bankP">${skBank!}</p>
                    <div class="btn" id="copySkBank" data-clipboard-text="${skBank!}">
                        复制银行
                    </div>
                </div>
                <div class="content-content-mess display" style="text-align: center">
                    <p id="nameP">${skName!}</p>
                    <div class="btn" id="copySkName" data-clipboard-text="${skName!}">
                        复制姓名
                    </div>
                </div>
                <div class="content-content-mess display">
                    <p id="cardP">${skCard!}</p>
                    <div class="btn" id="copySkCard" data-clipboard-text="${skCard!}">
                        复制卡号
                    </div>
                </div>
            </div>
        </div>
        <div class="content-header content-content-mess display" style="text-align: center">
            <p>￥${amount!}</p>
            <div class="btn" id="copyAmount" data-clipboard-text="${amount!}">
                复制金额
            </div>
        </div>
        <div class="content-header">
            <p style="font-size: 16px;color: red" id="tip">${tccardPayTip!}</p>
        </div>
        <div class="countDown" style="margin-top: 10px">
            <p>付款倒计时<span id="countdown" class="warning" style="color:red;font-size:1.2em">_</span></p>
        </div>
        <div class="warn display">
            <div class="warn-img">
                <img src="/tcpay/images/warn.svg" alt="">
            </div>

            <div class="warn-content">
                <p>1.请谨慎核实收款账号，错误支付导致无法到账，后果自负！</p>
                <p>2.如遇支付宝风控提示，可使用手机银行支付，不影响到账！</p>
            </div>
        </div>
        <div class="content-bottom">
            <div class="unpay display">
                <div class="unpay-img">
                    <img src="/tcpay/images/unpay.svg" alt="">
                </div>
                <div class="unpey-text">
                    <p>银联APP付款</p>
                    <p>打开银行APP → 点击转账 → 复制上方收款人信息 → 完成付款</p>
                </div>
            </div>
            <div class="unpay display">
                <div class="unpay-img">
                    <img src="/tcpay/images/alipay.svg" alt="">
                </div>
                <div class="unpey-text">
                    <p>支付宝付款</p>
                    <p>打开支付宝APP → 点击转账 → 转到银行卡并复制上方收款人信息 → 完成付款</p>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
</html>
<script src="/alipay_tf/jquery.min.js"></script>
<script src="/alipay_tf/clipboard.min.js"></script>
<script src="/alipay_tf/layer.js"></script>
<#--<script src="/alipay_tf/jquery.qrcode.min.js"></script>-->
<script src="/tcpay/reconnecting-websocket.js"></script>
<script type="text/javascript">
    // function getDeviceType() {
    //     if (/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)) {  //判断iPhone|iPad|iPod|iOS
    //         sid = 'ios';
    //     } else if (/(Android)/i.test(navigator.userAgent)) {   //判断Android
    //         sid = 'andorid';
    //     } else {  //pc
    //         sid = 'pc';
    //     };
    //     return sid;
    // }

    //带天数的倒计时
    var timer = null;
    var times = ${expireTime};
    countDown = function () {
        timer = setInterval(function () {
            if (times <= 0) {
                clearInterval(timer);
                $("#main_cc").html("<div style='text-align: center;'><span style='font-size:30px; color:red; text-align:center;'>支付超时，请重新下单</span></div>");
            } else {
                var day = 0,
                    hour = 0,
                    minute = 0,
                    second = 0;//时间默认值
                if (times > 0) {
                    day = Math.floor(times / (60 * 60 * 24));
                    hour = Math.floor(times / (60 * 60)) - (day * 24);
                    minute = Math.floor(times / 60) - (day * 24 * 60) - (hour * 60);
                    second = Math.floor(times) - (day * 24 * 60 * 60) - (hour * 60 * 60) - (minute * 60);
                }
                if (day <= 0) day = ''; else day = day + '天';
                if (hour <= 0) hour = ''; else hour = hour + '时';
                if (minute <= 0) minute = ''; else minute = minute + '分';
                $("#countdown").text(day + hour + minute + second + '秒');
                if (Math.ceil(times) % 3 == 0) {
                    $.ajax({
                        type: "POST",
                        async: true,
                        url: "/api/tcpay/query",
                        contentType: "application/x-www-form-urlencoded;charset=utf-8",
                        data: {
                            payOrderId: "${payOrderId!}"
                        },
                        success: function (rdata) {
                            data = JSON.parse(rdata);
                            if (data.status == '3' || data.status == '2') {
                                if (!data.url)
                                    $("#main_cc").html("<div style='text-align: center;'><span style='font-size:30px; color:green; text-align:center；'>支付成功</span></div>");
                                else
                                    window.location.href = data.url;
                            } else {
                                console.log(rdata);
                            }
                        }
                    });
                }
            }
            times--;
        }, 1000);
    }();

    var amount = "${amount!}";
    var skBank = "${skBank!}";
    var skName = "${skName!}";
    var skCard = "${skCard!}";
    var payOrderId = "${payOrderId!}";
    var radomRemark = "${radomRemark!}";
    var tccardPayTip = "${tccardPayTip!}";
    if (!tccardPayTip) {
        $("#tip").html('按页面金额(包括小数)转账,否则不到账后果自负<br>建议使用银行APP转账,成功率100%哦!');
    }

    $(function () {
        //复制金额
        var clp1 = new ClipboardJS('#copyAmount');
        clp1.on('success', function (e) {
            e.clearSelection();
            layer.msg('<div style="font-size:18px;color:#fff;">金额【<span style="color: red;">' + amount + '</span>】复制成功!<br/></div>', {time: 2000});
        });
        clp1.on('error', function (e) {
            layer.msg('请手动点击“复制金额”进行复制！');
        });

        //复制收款银行
        var copySkBank = new ClipboardJS('#copySkBank');
        copySkBank.on('success', function (e) {
            e.clearSelection();
            layer.msg('<div style="font-size:18px;color:#fff;">收款银行【<span style="color: red;">' + skBank + '</span>】复制成功！<br/></div>', {time: 2000});
        });
        copySkBank.on('error', function (e) {
            layer.msg('请手动点击“复制收款银行”进行复制！');
        });

        //复制收款人姓名
        var copySkName = new ClipboardJS('#copySkName');
        copySkName.on('success', function (e) {
            e.clearSelection();
            layer.msg('<div style="font-size:18px;color:#fff;">收款姓名【<span style="color: red;">' + skName + '</span>】复制成功！<br/></div>', {time: 2000});
        });
        copySkName.on('error', function (e) {
            layer.msg('请手动点击“复制收款姓名”进行复制！');
        });

        //复制收款人账号
        var copySkCard = new ClipboardJS('#copySkCard');
        copySkCard.on('success', function (e) {
            e.clearSelection();
            layer.msg('<div style="font-size:18px;color:#fff;">收款卡号【<span style="color: red;">' + skCard + '</span>】复制成功！<br/></div>', {time: 2000});
        });
        copySkCard.on('error', function (e) {
            layer.msg('请手动点击“收款卡号”进行复制！');
        });

        //复制附言参数
        var copyRadomRemark = new ClipboardJS('#copyRadomRemark');
        copyRadomRemark.on('success', function (e) {
            e.clearSelection();
            layer.msg('<div style="font-size:18px;color:#fff;">附言【<span style="color: red;">' + radomRemark + '</span>】复制成功！<br/></div>', {time: 2000});
        });
        copyRadomRemark.on('error', function (e) {
            layer.msg('请手动点击“复制附言”进行复制！');
        });
    })
</script>